<template>
<transition name="fadeOut" mode="out-in">
<div class="list">
   <ul>
     <li v-for="item in list.data">
     <router-link to="/article">
         <h1>{{item.user_info.nickname}}</h1>
     </router-link>
      
     </li>
   </ul>
</div>
</transition>
</template>

<script>
import Vue from 'vue'
import AJAXURL from "../../ajaxurl.js"
export default {
  data () {
    return {
     list:{
          "code": 0,
          "data": [],
          "msg": "",
          "page": 1
     }
    }
  },
  created:function(){
    Vue.http.get(AJAXURL.list).then((response) => {
          this.list.data=this.list.data.concat(response.data.data);
          this.$nextTick(function(){
             // window.onscroll=function(){
             //   console.log("-----------------------------滚动")
             // }
          })
    })
  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
.list{
  background: #fff;
  position: absolute;
  width: 100%;
}
h1, h2 {
  font-weight: normal;
}

ul {
  list-style-type: none;
  padding: 0;
}

li {
  display:block;
  border-bottom: 1px solid #ccc;
  margin: 0 10px;
}

a {
  color: #42b983;
  display: block;
}
</style>
